package com.example.yskjproject.adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.viewpager2.adapter.FragmentStateAdapter;

import com.example.yskjproject.ui.fragment.WalletPageFragment;

public class WalletPagerAdapter extends FragmentStateAdapter {

    public WalletPagerAdapter(@NonNull Fragment fragment) {
        super(fragment);
    }

    @NonNull
    @Override
    public Fragment createFragment(int position) {
        return WalletPageFragment.newInstance(position);
    }

    @Override
    public int getItemCount() {
        return 3; // 三个标签页
    }
}
